home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PAS_0693
/
CSTRTEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-06-30
|
844b
|
29 lines
{─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
Msg : 403 of 413
From : Todd Holmes 1:152/5.0 25 Jun 93 10:25
To : All
Subj : CStr Demo
────────────────────────────────────────────────────────────────────────────────}
Program CstrTest; {_Tested !!}
{Demostrates the use of CStr.Pas}
Uses Objects,Cstr;
Var
Stream: TBufStream;
I: integer;
PS: String;
begin
Stream.Init('Text.txt',stCreate,1024);
For I := 1 to 1000 do begin
Str(I,PS); {Converts Integer to String}
StorePstr(Stream,PS); {Stores Pas string on the stream as a C String}
end;
Stream.Done; {Shuts down the stream}
Stream.Init('Test.Txt',stOpenRead,1024);
Repeat
Writeln(LoadPStr(Stream));
Until Stream.GetPos = Stream.GetSize;
Stream.Done;
end.